package com.xoa.model.timedTask;

import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 任务执行记录实体类
 */
public class TimedTaskRecord {

    /**
     * 任务记录ID
     */
    private Integer treId;

    /**
     * 任务ID
     */
    private Integer taskId;

    /**
     * 执行人UserId
     */
    private String userId;

    /**
     * 执行人姓名
     */
    private String userName;

    /**
     * 执行开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date executionBeginTime;

    /**
     * 执行结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date executionEndTime;

    /**
     * 执行状态（0-执行中，1-成功，2-失败）
     */
    private String result;

    /**
     * 任务执行详情(异常日志)
     */
    private String resultLog;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column timed_task_record.TRE_ID
     *
     * @return the value of timed_task_record.TRE_ID
     *
     * @mbggenerated
     */
    public Integer getTreId() {
        return treId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column timed_task_record.TRE_ID
     *
     * @param treId the value for timed_task_record.TRE_ID
     *
     * @mbggenerated
     */
    public void setTreId(Integer treId) {
        this.treId = treId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column timed_task_record.TASK_ID
     *
     * @return the value of timed_task_record.TASK_ID
     *
     * @mbggenerated
     */
    public Integer getTaskId() {
        return taskId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column timed_task_record.TASK_ID
     *
     * @param taskId the value for timed_task_record.TASK_ID
     *
     * @mbggenerated
     */
    public void setTaskId(Integer taskId) {
        this.taskId = taskId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column timed_task_record.USER_ID
     *
     * @return the value of timed_task_record.USER_ID
     *
     * @mbggenerated
     */
    public String getUserId() {
        return userId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column timed_task_record.USER_ID
     *
     * @param userId the value for timed_task_record.USER_ID
     *
     * @mbggenerated
     */
    public void setUserId(String userId) {
        this.userId = userId == null ? null : userId.trim();
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Date getExecutionBeginTime() {
        return executionBeginTime;
    }

    public void setExecutionBeginTime(Date executionBeginTime) {
        this.executionBeginTime = executionBeginTime;
    }

    public Date getExecutionEndTime() {
        return executionEndTime;
    }

    public void setExecutionEndTime(Date executionEndTime) {
        this.executionEndTime = executionEndTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column timed_task_record.RESULT
     *
     * @return the value of timed_task_record.RESULT
     *
     * @mbggenerated
     */
    public String getResult() {
        return result;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column timed_task_record.RESULT
     *
     * @param result the value for timed_task_record.RESULT
     *
     * @mbggenerated
     */
    public void setResult(String result) {
        this.result = result == null ? null : result.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column timed_task_record.RESULT_LOG
     *
     * @return the value of timed_task_record.RESULT_LOG
     *
     * @mbggenerated
     */
    public String getResultLog() {
        return resultLog;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column timed_task_record.RESULT_LOG
     *
     * @param resultLog the value for timed_task_record.RESULT_LOG
     *
     * @mbggenerated
     */
    public void setResultLog(String resultLog) {
        this.resultLog = resultLog == null ? null : resultLog.trim();
    }
}